﻿using System.Configuration;

namespace EP.Base.BaseService.Manager.Config
{
    public class EmailServerConfigSection : ConfigurationSection
    {
        public static string SectionName
        {
            get { return "EmailServerConfig"; }
        }
        /// <summary>
        /// 主机
        /// </summary>
        [ConfigurationProperty("EmailHost", IsRequired = false)]
        public string EmailHost
        {
            get { return (string)this["EmailHost"]; }
            set { this["EmailHost"] = value; }
        }
        /// <summary>
        /// 端口
        /// </summary>
        [ConfigurationProperty("Port", IsRequired = false)]
        public int Port
        {
            get { return (int)this["Port"]; }
            set { this["Port"] = value; }
        }
        /// <summary>
        /// 发送地址
        /// </summary>
        [ConfigurationProperty("EmailFrom", IsRequired = false)]
        public string EmailFrom
        {
            get { return (string)this["EmailFrom"]; }
            set { this["EmailFrom"] = value; }
        }
        /// <summary>
        /// 发送地址
        /// </summary>
        [ConfigurationProperty("EmailName", IsRequired = false)]
        public string EmailName
        {
            get { return (string)this["EmailName"]; }
            set { this["EmailName"] = value; }
        }
        /// <summary>
        /// 密码
        /// </summary>
        [ConfigurationProperty("EmailPassword", IsRequired = false)]
        public string EmailPassword
        {
            get { return (string)this["EmailPassword"]; }
            set { this["EmailPassword"] = value; }
        }
        /// <summary>
        /// 启用ssl
        /// </summary>
        [ConfigurationProperty("EnableSsl", IsRequired = false)]
        public bool EnableSsl
        {
            get { return (bool)this["EnableSsl"]; }
            set { this["EnableSsl"] = value; }
        }

        
    }
}
